<div class="rowx" ng-if="$ctrl.model">
    <div ng-switch="$ctrl.column.dataType.toLowerCase()" class="col-9x">
        <div ng-switch-default>
            <p ng-if="$ctrl.maxLength" ng-bind="$ctrl.model|trim:$ctrl.maxLength"></p>
            <p ng-if="!$ctrl.maxLength" ng-bind="$ctrl.model" title="{{$ctrl.model}}"></p>
        </div>
        <div ng-switch-when="tag">
            <tags-input ng-model="$ctrl.model">
            </tags-input>
        </div>
        <div ng-switch-when="json">
            <p ng-if="$ctrl.maxLength" ng-bind="$ctrl.view"></p>
            <pre ng-if="!$ctrl.maxLength" ng-bind="$ctrl.model|json"></pre>

        </div>
        <div ng-switch-when="url">
            <a target="_blank" href="{{$ctrl.model}}" ng-bind="$ctrl.model"> </a>
        </div>
        <div ng-switch-when="datetime">
            <span ng-bind="$ctrl.model | utcToLocal:'dd-MM-yyyy hh:mm a'"> </span>
        </div>
        <div ng-switch-when="date">
            <span ng-bind="$ctrl.model | utcToLocal:'dd-MM-yyyy'"> </span>
        </div>
        <div ng-switch-when="upload">
            <preview-image img-height="25" img-src="$ctrl.model"></preview-image>
        </div>
        <div ng-switch-when="icon">
            <i class="{{$ctrl.model}}"> </i>
        </div>
        <div ng-switch-when="html">
            <p ng-bind-html="$ctrl.model"></p>
        </div>
        <div ng-switch-when="tuieditor">
            <div ng-bind-html="$ctrl.model"></div>
        </div>
        <div ng-switch-when="double">
            <p ng-bind-html="$ctrl.model"></p>
        </div>
        <div ng-switch-when="boolean">
            <input class="form-control" type="checkbox" ng-model="$ctrl.model" />
        </div>
        <div ng-switch-when="videoyoutube">
            <youtube-editor code="$ctrl.model" hide-input="'true'"></youtube-editor>
        </div>
        <div ng-switch-when="tuieditor">
            <div ng-bind-html="$ctrl.model | markdown"></div>
        </div>
        <div ng-switch-when="reference"></div>
        <div ng-switch-when="qrcode">
            <div id="{{$ctrl.uuid}}" ng-init="$ctrl.generateQRCode()"></div>
        </div>
    </div>
    <div class="col-9x" ng-if="$ctrl.column.isEncrypt && $ctrl.encryptedData">
        <a class="btn btn-info text-white" ng-click="$ctrl.showDecrypt = !$ctrl.showDecrypt">Decrypt</a>
        <p ng-if="$ctrl.showDecrypt" class="text-info" ng-bind="$ctrl.decrypted"></p>
    </div>
</div>